1. Field of Invention
The present invention relates to a method for automatically adjusting the sampling phase of a LCD control system.
2. Related Art
Due to the tremendous progress in the thin film transistor (TFT), the liquid crystal display (LCD) using this technology of TFT is also popular. However, since the LCD is a digital display, the analogue video signals output from the video card has to be converted into digital ones for displaying when it connects to a usual personal computer (PC). Therefore, an analogue to digital converter (ADC) is needed between the LCD and the video card. The main parameters that control the ADC are the sampling frequency and the sampling phase. The precision of them has a great influence on the sampling signals of the ADC, which in turn affects the image quality. Thus, only the correct sampling frequency and sampling phase are used can one get correct image values.
Currently, the methods for finding the best sampling phase include the method of calculation in the frequency domain and the method of calculating the maximum sum of difference in the time domain. The method of maximum sum of difference is to sample an image by ADC under some different sampling phases, to sum the absolute values of the gray scale difference between adjacent two points for each sampling phase as the image characteristic value, and to select the sampling phase with largest image characteristic value as the correct sampling phase. The summation is done by using Equation (1):                     C        =                              ∑                          i              =              1                        n                    ⁢                      "LeftBracketingBar"                                          P                                  i                  +                  1                                            -                              P                i                                      "RightBracketingBar"                                              (        1        )            
Nevertheless, when computing the image characteristic value with Equation (1), it is possible to set an incorrect sampling phase. For example, FIGS. 2, 3 and 4 show schematic diagrams of sampling points obtained at different sampling phases on the same input image. FIG. 2 has the correct sampling phase, while FIGS. 3 and 4 have wrong sampling phases. If Equation (1) is applied on FIGS. 2, 3 and 4, the image characteristic values thus obtained are, respectively:                                           C            1                    =                      xe2x80x83                    ⁢                                    ∑                              i                =                1                            n                        ⁢                          "LeftBracketingBar"                                                P                                      i                    +                    1                                                  -                                  P                  i                                            "RightBracketingBar"                                                                    =                      xe2x80x83                    ⁢                      0            +            0            +                          Δ              ⁢                              xe2x80x83                            ⁢              1                        +            0            +                          Δ              ⁢                              xe2x80x83                            ⁢              1                        +            0            +            0                                                        =                      xe2x80x83                    ⁢                      2            ⁢            Δ            ⁢                          xe2x80x83                        ⁢            1                                                                        C            2                    =                      xe2x80x83                    ⁢                                    ∑                              i                =                1                            n                        ⁢                          "LeftBracketingBar"                                                P                                      i                    +                    1                                                  -                                  P                  i                                            "RightBracketingBar"                                                                    =                      xe2x80x83                    ⁢                      0            +                          Δ              ⁢              2                        +                          (                                                Δ                  ⁢                                      xe2x80x83                                    ⁢                  1                                -                                  Δ                  ⁢                  2                                            )                        +                          (                                                Δ                  ⁢                                      xe2x80x83                                    ⁢                  1                                -                                  Δ                  ⁢                  3                                            )                        +                          Δ              ⁢              3                        +            0            +            0                                                        =                      xe2x80x83                    ⁢                      2            ⁢            Δ            ⁢                          xe2x80x83                        ⁢            1                                                                        C            3                    =                      xe2x80x83                    ⁢                                    ∑                              i                =                1                            n                        ⁢                          "LeftBracketingBar"                                                P                                      i                    +                    1                                                  -                                  P                  i                                            "RightBracketingBar"                                                                    =                      xe2x80x83                    ⁢                      0            +                          Δ              ⁢              4                        +                          (                                                Δ                  ⁢                                      xe2x80x83                                    ⁢                  1                                -                                  Δ                  ⁢                  4                                            )                        +                          (                                                Δ                  ⁢                                      xe2x80x83                                    ⁢                  1                                -                                  Δ                  ⁢                  4                                            )                        +                          Δ              ⁢              4                        +            0            +            0                                                        =                      xe2x80x83                    ⁢                      2            ⁢            Δ            ⁢                          xe2x80x83                        ⁢            1                              
The image characteristic values are all 2xcex941. So there is no way to get the largest image characteristic value, and this method cannot find the correct sampling phase. Furthermore, when changing the time domain to the frequency domain for calculation, though a better precision can be obtained, yet the complicated conversion needed makes it hard to implement by hardware.
In view of the foregoing problems, it is an object of the present invention to provide a method with less complexity and easy to implement for phase adjustment, which can correctly set the sampling phase of the ADC in a LCD control system.
The instant invention discloses a method for automatically adjusting the sampling phase of a LCD control system, which is used to adjust the sampling phase of the ADC in the LCD control system. This method comprises the steps of:
setting a correct sampling frequency;
setting the range of sampling phases;
computing the image characteristic value C under different sampling phases using the following equation:   C  =            ∑              i        =        0            n        ⁢          "LeftBracketingBar"                        2          ⁢                      P            i                          -                  P                      i            -            1                          -                  P                      i            +            1                              "RightBracketingBar"      
xe2x80x83where i""s are image points and Pi are the gray scale values of the corresponding image points; and
comparing obtained image characteristic values and selecting the sampling phase with the largest image characteristic value as the correct sampling phase.
The method for automatically adjusting the sampling phase of a LCD control system uses a special function to obtain the image characteristic value. It can effectively and correctly set the sampling phase of the ADC in the LCD control system for the LCD to display clear images. In addition, for systems with large noise, this method can remove noisy signals from the lower bits with a mask register so as to increase the precision of the sampling phase adjustment.
Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.